package com.example.demotest.pojo.dto;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class OrderStatusDto {
    @NotNull(message = "订单ID不能为空")
    private Integer orderId;  // 添加订单ID字段

    @NotNull(message = "订单状态不能为空")
    @Min(value = 0, message = "无效的订单状态码（范围：0-4）")
    @Max(value = 4, message = "无效的订单状态码（范围：0-4）")
    private Integer orderStatus;  // 对应前端状态码：0=待付款，1=待发货，2=待收货，3=已完成，4=已取消

    public Integer getId() {
        return orderId;  // 返回订单ID
    }

    public void setId(Integer id) {
        this.orderId = id;  // 设置订单ID
    }
}